package com.sdl.pages;

import java.util.regex.Pattern;
import java.util.concurrent.TimeUnit;
import org.testng.*;
import org.testng.annotations.*;
import static org.junit.Assert.*;
import static org.hamcrest.CoreMatchers.*;
import org.openqa.selenium.*;
import org.openqa.selenium.firefox.FirefoxDriver;
import org.openqa.selenium.support.ui.Select;

public class First_IDE extends com.sdl.pages.TestBase {
    private boolean acceptNextAlert = true;
    private StringBuffer verificationErrors = new StringBuffer();

    @Test
    public void testUntitled() throws Exception {
        driver.get(baseUrl + "/InfoShareAuthormsemenikhin/#app=sc&entry=architect");
        //driver.findElement(By.id("MenuButton1")).click();
        // ERROR: Caught exception [ERROR: Unsupported command [selectFrame | relative=parent | ]]
        // ERROR: Caught exception [ERROR: Unsupported command [selectFrame | REPOSITORY | ]]
        // ERROR: Caught exception [ERROR: Unsupported command [selectFrame | id=RepositoryFrame | ]]
    }

    private boolean isElementPresent(By by) {
        try {
            driver.findElement(by);
            return true;
        } catch (NoSuchElementException e) {
            return false;
        }
    }

    private String closeAlertAndGetItsText() {
        try {
            Alert alert = driver.switchTo().alert();
            String alertText = alert.getText();
            if (acceptNextAlert) {
                alert.accept();
            } else {
                alert.dismiss();
            }
            return alertText;
        } finally {
            acceptNextAlert = true;
        }
    }
}
